<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创建一个电脑对象</title>
    <script>
        var computer = {
            color: 'red',
            weight: '500',
            brand: '不知',
            model: '不知',
            knockCode: function () {
                console.log('敲代码');
            }
        };
        computer.knockCode();
    </script>
</head>

<body>

</body>

</html>